import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue()],
    css: {
        preprocessorOptions: {
            scss: {
                additionalData: `@import "./src/assets/css/webUtilsScss.scss";` // 此处全局的scss文件
            }
        }
    },
    server: {
        proxy: {
            '/app': {
                target: 'http://10.0.21.77:27001', // 目标服务器地址
                changeOrigin: true, // 是否改变源地址
                rewrite: (path) => path.replace(/^\/app/, 'app'), // 重写路径
            }
        },
        // host: 'localhost',
        port: '5177',
        open: false,
    },
})
